.class Lcom/waiqin365/lightapp/im/activity/cc;
.super Ljava/lang/Object;

# interfaces
.implements Ljava/lang/Runnable;


# instance fields
.field final synthetic a:Lcom/waiqin365/lightapp/im/activity/GroupDetailsActivity;


# direct methods
.method constructor <init>(Lcom/waiqin365/lightapp/im/activity/GroupDetailsActivity;)V
    .locals 0

    iput-object p1, p0, Lcom/waiqin365/lightapp/im/activity/cc;->a:Lcom/waiqin365/lightapp/im/activity/GroupDetailsActivity;

    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    return-void
.end method


# virtual methods
.method public run()V
    .locals 6

    :try_start_0
    sget-object v0, Lcom/hyphenate/chat/EMMessage$Type;->TXT:Lcom/hyphenate/chat/EMMessage$Type;

    invoke-static {v0}, Lcom/hyphenate/chat/EMMessage;->createSendMessage(Lcom/hyphenate/chat/EMMessage$Type;)Lcom/hyphenate/chat/EMMessage;

    move-result-object v0

    sget-object v1, Lcom/hyphenate/chat/EMMessage$ChatType;->GroupChat:Lcom/hyphenate/chat/EMMessage$ChatType;

    invoke-virtual {v0, v1}, Lcom/hyphenate/chat/EMMessage;->setChatType(Lcom/hyphenate/chat/EMMessage$ChatType;)V

    new-instance v1, Ljava/lang/StringBuilder;

    invoke-direct {v1}, Ljava/lang/StringBuilder;-><init>()V

    invoke-static {}, Lcom/hyphenate/chat/EMClient;->getInstance()Lcom/hyphenate/chat/EMClient;

    move-result-object v2

    invoke-virtual {v2}, Lcom/hyphenate/chat/EMClient;->getCurrentUser()Ljava/lang/String;

    move-result-object v2

    iget-object v3, p0, Lcom/waiqin365/lightapp/im/activity/cc;->a:Lcom/waiqin365/lightapp/im/activity/GroupDetailsActivity;

    invoke-static {v2, v3}, Lcom/waiqin365/lightapp/im/utils/e;->a(Ljava/lang/String;Landroid/content/Context;)Ljava/lang/String;

    move-result-object v2

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    iget-object v2, p0, Lcom/waiqin365/lightapp/im/activity/cc;->a:Lcom/waiqin365/lightapp/im/activity/GroupDetailsActivity;

    const v3, 0x7f0802a0

    invoke-virtual {v2, v3}, Lcom/waiqin365/lightapp/im/activity/GroupDetailsActivity;->getString(I)Ljava/lang/String;

    move-result-object v2

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    iget-object v2, p0, Lcom/waiqin365/lightapp/im/activity/cc;->a:Lcom/waiqin365/lightapp/im/activity/GroupDetailsActivity;

    invoke-static {v2}, Lcom/waiqin365/lightapp/im/activity/GroupDetailsActivity;->l(Lcom/waiqin365/lightapp/im/activity/GroupDetailsActivity;)Ljava/lang/String;

    move-result-object v2

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v1

    new-instance v2, Lcom/hyphenate/chat/EMTextMessageBody;

    invoke-direct {v2, v1}, Lcom/hyphenate/chat/EMTextMessageBody;-><init>(Ljava/lang/String;)V

    new-instance v1, Ljava/util/Date;

    invoke-direct {v1}, Ljava/util/Date;-><init>()V

    invoke-virtual {v1}, Ljava/util/Date;->getTime()J

    move-result-wide v4

    invoke-virtual {v0, v4, v5}, Lcom/hyphenate/chat/EMMessage;->setMsgTime(J)V

    invoke-static {}, Lcom/hyphenate/chat/EMClient;->getInstance()Lcom/hyphenate/chat/EMClient;

    move-result-object v1

    invoke-virtual {v1}, Lcom/hyphenate/chat/EMClient;->getCurrentUser()Ljava/lang/String;

    move-result-object v1

    invoke-virtual {v0, v1}, Lcom/hyphenate/chat/EMMessage;->setFrom(Ljava/lang/String;)V

    iget-object v1, p0, Lcom/waiqin365/lightapp/im/activity/cc;->a:Lcom/waiqin365/lightapp/im/activity/GroupDetailsActivity;

    invoke-static {v1}, Lcom/waiqin365/lightapp/im/activity/GroupDetailsActivity;->c(Lcom/waiqin365/lightapp/im/activity/GroupDetailsActivity;)Ljava/lang/String;

    move-result-object v1

    invoke-virtual {v0, v1}, Lcom/hyphenate/chat/EMMessage;->setReceipt(Ljava/lang/String;)V

    const-string/jumbo v1, "is_notification"

    const/4 v3, 0x1

    invoke-virtual {v0, v1, v3}, Lcom/hyphenate/chat/EMMessage;->setAttribute(Ljava/lang/String;Z)V

    invoke-virtual {v0, v2}, Lcom/hyphenate/chat/EMMessage;->addBody(Lcom/hyphenate/chat/EMMessageBody;)V

    invoke-static {}, Lcom/hyphenate/chat/EMClient;->getInstance()Lcom/hyphenate/chat/EMClient;

    move-result-object v1

    invoke-virtual {v1}, Lcom/hyphenate/chat/EMClient;->chatManager()Lcom/hyphenate/chat/EMChatManager;

    move-result-object v1

    invoke-virtual {v1, v0}, Lcom/hyphenate/chat/EMChatManager;->sendMessage(Lcom/hyphenate/chat/EMMessage;)V

    invoke-static {}, Lcom/hyphenate/chat/EMClient;->getInstance()Lcom/hyphenate/chat/EMClient;

    move-result-object v0

    invoke-virtual {v0}, Lcom/hyphenate/chat/EMClient;->groupManager()Lcom/hyphenate/chat/EMGroupManager;

    move-result-object v0

    iget-object v1, p0, Lcom/waiqin365/lightapp/im/activity/cc;->a:Lcom/waiqin365/lightapp/im/activity/GroupDetailsActivity;

    invoke-static {v1}, Lcom/waiqin365/lightapp/im/activity/GroupDetailsActivity;->c(Lcom/waiqin365/lightapp/im/activity/GroupDetailsActivity;)Ljava/lang/String;

    move-result-object v1

    invoke-virtual {v0, v1}, Lcom/hyphenate/chat/EMGroupManager;->leaveGroup(Ljava/lang/String;)V

    iget-object v0, p0, Lcom/waiqin365/lightapp/im/activity/cc;->a:Lcom/waiqin365/lightapp/im/activity/GroupDetailsActivity;

    new-instance v1, Lcom/waiqin365/lightapp/im/activity/cd;

    invoke-direct {v1, p0}, Lcom/waiqin365/lightapp/im/activity/cd;-><init>(Lcom/waiqin365/lightapp/im/activity/cc;)V

    invoke-virtual {v0, v1}, Lcom/waiqin365/lightapp/im/activity/GroupDetailsActivity;->runOnUiThread(Ljava/lang/Runnable;)V
    :try_end_0
    .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0

    :goto_0
    return-void

    :catch_0
    move-exception v0

    iget-object v0, p0, Lcom/waiqin365/lightapp/im/activity/cc;->a:Lcom/waiqin365/lightapp/im/activity/GroupDetailsActivity;

    new-instance v1, Lcom/waiqin365/lightapp/im/activity/ce;

    invoke-direct {v1, p0}, Lcom/waiqin365/lightapp/im/activity/ce;-><init>(Lcom/waiqin365/lightapp/im/activity/cc;)V

    invoke-virtual {v0, v1}, Lcom/waiqin365/lightapp/im/activity/GroupDetailsActivity;->runOnUiThread(Ljava/lang/Runnable;)V

    goto :goto_0
.end method
